package com.touni.designpattern.adapterpattern;

/**
 * @ClassName : AudioPlayer
 * @Description :
 * @Author : lwq
 * @Date: 2020-10-22 10:50
 */
public class AudioPlayer implements MediaPlayer {
    private MediaAdapter mediaAdapter;
    @Override
    public void play(String fileType, String fileName) {
        if ("mp3".equals(fileType)){
            System.out.println("mp3 play fileName=" + fileName);
        }else if ("vcl".equals(fileType) || "mp4".equals(fileType)){
            new MediaAdapter(fileType).play(fileType,fileName);
        }
    }
}
